package com.xiaochong.tir.manager.service;

import java.util.List;

import com.xiaochong.tir.manager.config.druid.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xiaochong.tir.common.data.mapper.AccountRoleMapper;
import com.xiaochong.tir.common.data.po.AccountRole;
import org.springframework.transaction.annotation.Transactional;

@Service
public class AccountRoleService {
	@Autowired
	private AccountRoleMapper accountRoleMapper;

	public String getRolesByAccountId(AccountRole accountRole) {
		return accountRoleMapper.getRolesByAccountId(accountRole);
	}
	@Operation
	@Transactional
	public int insertBatch(List<AccountRole> list) {
		return accountRoleMapper.insertBatch(list);
	}

	public int deleteByAccountId(Integer accountId) {
		return accountRoleMapper.deleteByAccountId(accountId);
	}

}
